<template>
	<div>
		<SearchHeader :cities="cities"></SearchHeader>
	</div>
</template>
<script>
import SearchHeader from './components/Header'

export default {
	name: 'Search',
	components: {
		SearchHeader
	},
	data () {
		return {
			cities: {}
		}
	},
	methods: {
		getCityList () {
			this.$api.getData.getCity()
			.then(res => {
				if (res.ret) {	
					const data = res.data			
					this.cities = data.cities
				}
			})
		}
	},
	mounted () {
		this.getCityList()
	}
}
</script>
